wayland: Fix gdk_window_wayland_resize_cairo_surface()
authorRui Matos <tiagomatos@gmail.com>
Sat, 22 Feb 2014 18:10:59 +0000 (19:10 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 23 Feb 2014 17:40:29 +0000 (18:40 +0100)
Like in other backends (except X) we can't resize cairo image surfaces
so let's sync the code here with what the other backends do.

This prevents the painting machinery above us to paint on the wrong
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=724968

gdk/wayland/gdkwindow-wayland.c

index b0772b51eac091d3e1e4ef1a26a6078f0a3799ff..d980bf86995788059ff0ec0a59849bc302e7f2ac 100644 (file)
@@ -1487,7 +1487,10 @@ gdk_window_wayland_resize_cairo_surface (GdkWindow       *window,
                                          gint             width,
                                          gint             height)
 {
-  return surface;
+  /* cairo image surfaces cannot be resized */
+  cairo_surface_destroy (surface);
+
+  return NULL;
 }
 
 static cairo_region_t *